home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / SPLINE.ZIP / SHOWSPL.INC < prev    next >
Encoding:
Text File  |  1997-03-10  |  1.3 KB  |  38 lines

  1. // ***********************************************************
  2. // SPLINE GENERATOR INCLUDE FILE FOR PERSISTENCE OF VISION 3.x
  3. //    SPLINE PREVIEW FILE
  4. // ***********************************************************
  5. //
  6. // Created by Chris Colefax, February 1997
  7. //
  8. // See "Spline.txt" for more information.
  9. //
  10. // ***********************************************************
  11.  
  12. // CHECK DECLARED VARIABLES AND SET DEFAULT VALUES
  13. // ***********************************************
  14.    #declare _SP_tempver = version
  15.    #ifndef (spline_smoothness) #declare spline_smoothness = 50 #end
  16.    #ifndef (spline_object)
  17.       #declare spline_object = sphere {<0,0,0>, .5
  18.          pigment {rgb <1, 1, 1>}
  19.          finish {ambient 1 diffuse 0}
  20.          no_shadow}
  21.    #end
  22.  
  23. // CREATE SPLINE PREVIEW OBJECT
  24. // ***********************************************
  25.    #ifdef (spline_file)
  26.       union {
  27.          #declare spline_smoothness = (1 / spline_smoothness)
  28.          #declare spline_clock = 0 #while (spline_clock <= 1)
  29.             #include spline_file
  30.             object {spline_object translate spline_pos}
  31.          #declare spline_clock = spline_clock + spline_smoothness #end
  32.       }
  33.    #else
  34.       #warning "No spline_file was specified!  "
  35.    #end
  36.  
  37.    #version _SP_tempver
  38.